package com.ipartek.formacion.regularexpersion;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ExpresionesRegulares {
	public static boolean patronMatch(final String patron, final String cadena) {
		final Pattern pat = Pattern.compile(patron);
		final Matcher mat = matcher(pat, cadena);
		return matcherBoolean(mat);
	}

	public static boolean matcherBoolean(final Matcher mat) {
		return mat.matches();
	}

	public static Matcher matcher(final Pattern pat, final String cadena) {
		return pat.matcher(cadena);
	}
}
